home *** CD-ROM | disk | FTP | other *** search
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- vmeio_piomap_alloc, vmeio_piomap_addr, vmeio_piomap_done,
- vmeio_piomap_free, vmeio_pio_bcopyin, vmeio_pio_bcopyout,
- vmeio_dmamap_alloc, vmeio_dmamap_addr, vmeio_dmamap_list,
- vmeio_dmamap_done, vmeio_dmamap_free, vmeio_intr_alloc,
- vmeio_intr_vector_get, vmeio_intr_connect, vmeio_intr_disconnect,
- vmeio_intr_free, - VMEbus device driver API
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////vvvvmmmmeeee////vvvvmmmmeeeeiiiioooo....hhhh>>>>
-
- PPPPrrrrooooggggrrrraaaammmmmmmmeeeedddd IIIIOOOO
- vmeio_piomap_t vmeio_piomap_alloc(vertex_hdl_t vme_conn,
- device_desc_t dev_desc,
- vmeio_space_t space,
- iopaddr_t vmeaddr,
- size_t byte_count,
- size_t byte_count_max,
- unsigned flags);
-
- caddr_t vmeio_piomap_addr(vmeio_piomap_t piomap,
- iopaddr_t vmeaddr,
- size_t byte_count);
-
- void vmeio_piomap_done(vmeio_piomap_t piomap);
-
- void vmeio_piomap_free(vmeio_piomap_t piomap);
-
- size_t vmeio_pio_bcopyin(vmeio_piomap_t piomap,
- iopaddr_t vmeaddr,
- caddr_t dest_sys_addr,
- int byte_count,
- int itmsz,
- int flags);
-
- int vmeio_pio_bcopyout(vmeio_piomap_t piomap,
- iopaddr_t vmeaddr,
- caddr_t src_sys_addr,
- size_t byte_count,
- int itmsz,
- int flags);
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _v_m_e__c_o_n_n VMEbus connection point.
-
- _d_e_v__d_e_s_c Device descriptor, usually 0.
-
- _s_p_a_c_e Type of the VMEbus space.
-
- _v_m_e_a_d_d_r The offset within the space.
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- _b_y_t_e__c_o_u_n_t Size of the mapping.
-
- _b_y_t_e__c_o_u_n_t__m_a_x Maximum size of a single mapping.
-
- _f_l_a_g_s User specifiable options.
-
- _p_i_o_m_a_p The mapping acquired by the _v_m_e_i_o__p_i_o_m_a_p__a_l_l_o_c().
-
- _d_e_s_t__s_y_s__a_d_d_r The system address which the data is copied to.
-
- _s_r_c__s_y_s__a_d_d_r The system address which the data is copied from.
-
- _i_t_m_s_z The unit of transfer.
-
- DDDDiiiirrrreeeecccctttt MMMMeeeemmmmoooorrrryyyy AAAAcccccccceeeessssssss
- vmeio_dmamap_t vmeio_dmamap_alloc(vertex_hdl_t vme_conn,
- device_desc_t dev_desc,
- vmeio_space_t space,
- size_t byte_count_max,
- unsigned flags);
-
- iopaddr_t vmeio_dmamap_addr(vmeio_dmamap_t dmamap,
- paddr_t paddr,
- size_t byte_count);
-
- alenlist_t vmeio_dmamap_list(vmeio_dmamap_t dmamap,
- alenlist_t phys_alenlist,
- unsigned flags);
-
- void vmeio_dmamap_done(vmeio_dmamap_t dmamap);
-
- void vmeio_dmamap_free(vmeio_dmamap_t dmamap);
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _v_m_e__c_o_n_n VMEbus connection point.
-
- _d_e_v__d_e_s_c Device descriptor, usually zero.
-
- _s_p_a_c_e Type of the VMEbus space.
-
- _b_y_t_e__c_o_u_n_t__m_a_x Maximum size of a single mapping.
-
- _d_m_a_m_a_p The mapping resources aquired through _v_m_e_i_o__d_m_a_m_a_p__a_l_l_o_c().
-
- _p_a_d_d_r Physical address.
-
- _b_y_t_e__c_o_u_n_t Size of the mapping.
-
- _p_h_y_s__a_l_e_n_l_i_s_t The list of pairs of physical address and length.
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- _f_l_a_g_s Specifying attributes of the DMA mapping.
-
- IIIInnnntttteeeerrrrrrrruuuupppptttt HHHHaaaannnnddddlllliiiinnnngggg
- vmeio_intr_t vmeio_intr_alloc(vertex_hdl_t vme_conn,
- device_desc_t dev_desc,
- vmeio_intr_vector_t vec,
- vmeio_intr_level_t level,
- vertex_hdl_t owner_dev,
- unsigned flags);
-
- vmeio_intr_vector_t vmeio_intr_vector_get(vmeio_intr_t intr)
-
- int vmeio_intr_connect(vmeio_intr_t intr,
- intr_func_t intr_func,
- intr_arg_t intr_arg,
- void *thread);
-
- void vmeio_intr_disconnect(vmeio_intr_t intr);
-
- void vmeio_intr_free(vmeio_intr_t intr);
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _v_m_e__c_o_n_n VMEbus connection point.
-
- _d_e_v__d_e_s_c Device descriptor, usually zero.
-
- _v_e_c Interrupt vector number.
-
- _l_e_v_e_l VMEbus Interrupt level.
-
- _o_w_n_e_r__d_e_v The vertex used to print messages about this particular
- interrupt, usually zero.
-
- _f_l_a_g_s User specifiable options.
-
- _i_n_t_r Interrupt handle acquired by _v_m_e_i_o__i_n_t_r__a_l_l_o_c().
-
- _i_n_t_r__f_u_n_c The function used for interrupt service.
-
- _i_n_t_r__a_r_g The argument passed to _i_n_t_r__f_u_n_c.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- On Origin and Onyx2 systems, _v_m_e_i_o provides a set of routines for VMEbus
- kernel device drivers to set up services for their devices. These
- services include:
-
- +o registering all instances of the device in the system.
-
- +o constructing CPU addresses that the device can use to do PIO to the
- device.
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- +o constructing VMEbus addresses that the device can use to do DMA.
-
- +o arranging for a function to be called when the device requests
- interrupt service.
-
- +o arranging for a function to be called when an error occurs during PIO
- or DMA operations on the device.
-
- PPPPrrrrooooggggrrrraaaammmmmmmmeeeedddd IIIIOOOO
- _v_m_e_i_o__p_i_o_m_a_p__a_l_l_o_c() allocates the PIO resources for the given
- requirement. Return the handle of the PIO resources if success, 0
- otherwise. The VMEbus specific flags include VME_PIOMAP_FIXED,
- VME_PIOMAP_UNFIXED, and VME_DEBUG. VME_DEBUG is used to do more integrity
- checking. Possibly, device driver writers can turn on this mode to sanity
- check their drivers a bit, with some degree of performance degradation.
-
- _v_m_e_i_o__p_i_o_m_a_p__a_d_d_r() establishes a mapping from a VME bus address range to
- a kernel virtual address range using the allocated PIO resources. Return
- the kernel virtual address if success, 0 if otherwise.
-
- _v_m_e_i_o__p_i_o_m_a_p__d_o_n_e() notifies the system that a driver is done with using
- the piomap resources obtained by the earlier _v_m_e_i_o__p_i_o_m_a_p__a_d_d_r() call.
-
- _v_m_e_i_o__p_i_o_m_a_p__f_r_e_e() frees the PIO mapping resources.
-
- _v_m_e_i_o__p_i_o__b_c_o_p_y_i_n() copies data from the device buffer to the system
- memory efficiently. The unit of the transfer can be 1 byte, 2 bytes, 4
- bytes, and 8 bytes. Return total bytes of successful transfer, -1 if
- function fails.
-
- _v_m_e_i_o__p_i_o__b_c_o_p_y_o_u_t() copies data from the system memory to the device
- buffer efficiently. The unit of the transfer can be 1 byte, 2 bytes, 4
- bytes, and 8 bytes. Return total bytes of successful transfer, -1 if
- function fails.
-
- DDDDiiiirrrreeeecccctttt MMMMeeeemmmmoooorrrryyyy AAAAcccccccceeeessssssss
- _v_m_e_i_o__d_m_a_m_a_p__a_l_l_o_c() allocates mapping resources needed for DMA. Return
- the handle of the new DMA map if success, 0 if failed. As described
- before, VME_DEBUG can be used as a flag passed to have stronger integrity
- checking over the life-span of the DMA map. Flags available for this
- call are:
-
- _VVVV_MMMM_EEEE_IIII_OOOO______DDDD_MMMM_AAAA______DDDD_AAAA_TTTT_AAAA
- specifies that the DMA channel will be used for data streams.
- Prefetch and postwrite are enabled on this mapping.
-
- _VVVV_MMMM_EEEE_IIII_OOOO______DDDD_MMMM_AAAA______CCCC_MMMM_DDDD
- specifies that the DMA channel will be used for command
- information. Prefetch and postwrite are disabled on this mapping.
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- _v_m_e_i_o__d_m_a_m_a_p__a_d_d_r() establishes a mapping from a physical address range
- to a VMEbus address range by using the allocated DMA resources. Return
- VMEbus address mapped to the physical addr range if success,
- _VVVV_MMMM_EEEE_IIII_OOOO______DDDD_MMMM_AAAA______IIII_NNNN_VVVV_AAAA_LLLL_IIII_DDDD______AAAA_DDDD_DDDD_RRRR otherwise.
-
- _v_m_e_i_o__d_m_a_m_a_p__l_i_s_t() establishes the mapping from a list of (physical
- address, length) to a list of (VMEbus address, length). Return the list
- of (VMEbus address, length) if success, 0 if failed. The returned list
- should be freed by the caller. Flags avalable for this call are:
-
- _VVVV_MMMM_EEEE_IIII_OOOO______IIII_NNNN_PPPP_LLLL_AAAA_CCCC_EEEE
- requests that the list be modified in place when list operations
- are performed.
-
- _VVVV_MMMM_EEEE_IIII_OOOO______NNNN_OOOO_SSSS_LLLL_EEEE_EEEE_PPPP
- requests that the VMEbus provider not to sleep in resource
- allocation and failure should be returned if sleep is necessary
- for getting the resources.
-
- _v_m_e_i_o__d_m_a_m_a_p__d_o_n_e() notifies the system that a driver is done with using
- the DMA mapping resource.
-
- _v_m_e_i_o__d_m_a_m_a_p__f_r_e_e() frees the DMA resources acquired by
- _v_m_e_i_o__d_m_a_m_a_p__a_l_l_o_c() call.
-
- IIIInnnntttteeeerrrrrrrruuuupppptttt HHHHaaaannnnddddlllliiiinnnngggg
- _v_m_e_i_o__i_n_t_r__a_l_l_o_c() allocates interrupt resources. This function is
- usually called in <_d_r_v>__e_d_t_i_n_i_t(). In some cases, users have a VME
- device which comes with a fixed interrupt vector number, or users like to
- fix the interrupt vector for their devices. If so, they can specify the
- vector number on the VECTOR line statement. And they can declare the
- vector number here. In most of cases, users just need a vector, they can
- pass VME_INTR_VECTOR_ANY in the vmeio_intr_vector_t field. Here,
- VME_DEBUG can be specified as a flag to help debugging.
-
- _v_m_e_i_o__i_n_t_r__v_e_c_t_o_r__g_e_t() retrieves interrupt vector number from the
- interrupt object. Usually, people will ask the system dynamically assign
- an interrupt vector so that they can associate their interrupt handler.
- They need this function to find out what interrupt vector number is
- assigned to them so that they can program interrupt registers of their
- devices. Sometimes, the driver already knows the vector number since they
- have declared the fixed ones in the configuration file.
-
- _v_m_e_i_o__i_n_t_r__c_o_n_n_e_c_t() associates a software interrupt handler to the
- hardware interrupt resources. Return 0 if success, -1 if failure.
-
- _v_m_e_i_o__i_n_t_r__d_i_s_c_o_n_n_e_c_t() disassociates the interrupt handler from the
- specified interrupt.
-
- _v_m_e_i_o__i_n_t_r__f_r_e_e() frees the interrupt resources. Usually, the interrupt
- vector allocated for the device is freed here.
-
-
-
-
- PPPPaaaaggggeeee 5555
-
-
-
-
-
-
- vvvvmmmmeeeeiiiioooo((((DDDD3333)))) vvvvmmmmeeeeiiiioooo((((DDDD3333))))
-
-
-
- FFFFIIIILLLLEEEESSSS
- /var/sysgen/system
- /var/sysgen/master.d
- /var/sysgen/boot
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- "IRIX Device Driver Programmer's Guide"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 6666
-
-
-
-